package com.example.spring4.dao.impl;


import com.example.spring4.dao.IUserDao;
import com.example.spring4.model.User;
import org.springframework.stereotype.Repository;

@Repository
public class UserDaoImpl implements IUserDao {
    @Override
    public User getUserById(Integer id) {
        User user=new User();
        user.setUsername("李四");
        user.setId(id);
        System.out.println("一次查询");
        return user;
    }

    @Override
    public int insertUser(User user) {
        System.out.println(user.getCreateBy()+"插入了一条数据");
        return 0;
    }
}
